//
//  DCHTableViewControllerWO.m
//  DCH-BaiSiBuDeJie
//
//  Created by apple on 16/10/18.
//  Copyright © 2016年 xiaomage. All rights reserved.
//

#import "DCHTableViewControllerWO.h"
#import "UIBarButtonItem+Item.h"
#import "DCHViewControllerFANHUI.h"

@interface DCHTableViewControllerWO ()

@end

@implementation DCHTableViewControllerWO

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor =[UIColor yellowColor];
    
    [self setupNavBar];
}

- (void)setupNavBar
{
   self.navigationItem.title =@"我的";

    

    UIBarButtonItem *nightMode =[UIBarButtonItem itemWithImage:[UIImage imageNamed:@"mine-moon-icon"] selImage:[UIImage imageNamed:@"mine-moon-icon-click"] target:self action:@selector(nightClick:)];

    
    UIBarButtonItem *setting =[UIBarButtonItem itemWithImage:[UIImage imageNamed:@"mine-setting-icon"] highImage:[UIImage imageNamed:@"mine-setting-icon-click"] target:self action:@selector(settingClick)];
    
    
    self.navigationItem.rightBarButtonItems =@[setting,nightMode];
}
- (void)nightClick:(UIButton *)btn
{

    btn.selected =!btn.selected;

}

- (void)settingClick
{
    DCHViewControllerFANHUI *settingVC =[[DCHViewControllerFANHUI alloc]init];

   
    [self.navigationController pushViewController:settingVC animated:YES];
}

@end
